/*
 * @文件描述: 
 * @版本: 
 * @作者: 周晨阳
 * @Date: 2021-02-03 17:36:18
 */
#ifndef BEEPER_H
#define BEEPER_H

#include "public.h"
#include <rtthread.h>

#define BEEPER_INFO -1
#define BEEPER_ERROR -2
#define BEEPER_WARNING -3

#define BEEPER_MUTE 1
#define BEEPER_UNMUTE 2
//有源蜂鸣器
#ifndef WIN_SIM
#define BEEPER_GPIO_PIN GPIO_Pin_7
#define BEEPER_GPIO_PORT GPIOA
#define BEEPER_GPIO_CLK RCC_AHB1Periph_GPIOA
#endif
void Beeper_Init(void);
void beeperTrigger(int ms);
void beeperLoopPlay(uint8_t ms, uint8_t time);
void beeperMute(void);
void beeperUnMute(void);
#endif